package com.mc.service;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.mc.model.Article;

public interface ArticleService {
    int deleteByPrimaryKey(Integer id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer id);
    
    /**级联查询*/
    Article selectByPrimaryKeyAndCascade(Integer id);
    
    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKey(Article record);
    
    List<Article> selectAll();
    
    List<Article> selectLimit(int start, int size);
    
    /**获取数据总的数量*/
    long count();
    
    /**根据主菜单名称查找相关文章。*/
    List<Article> selectByMenuName(String menuName);
    
    public Set<String> getSubMenuNames(List<Article> articles);
}